﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tesla.Service.DataContracts;

namespace Tesla.Util.ValidateEntity
{
    public class VPersistantEmpoyeeDC : IValidator<BaseDC>
    {
        public bool IsValid(BaseDC entity)
        {
            return BrokenRules(entity).Count() > 0;
        }

        public IEnumerable<string> BrokenRules(BaseDC entity)
        {
            //EmployeeDC e = entity as EmployeeDC;

            //if (string.IsNullOrEmpty(e.FirstName))
            //    yield return "Name is Blank";

            //if (string.IsNullOrEmpty(e.LastName))
            //    yield return "Last name is blank";

            //yield break;
            return null;
        }
    }
}
